/**
 * 
 */
package com.onstar.cn.map.listener;

import java.util.List;

import com.onstar.cn.map.common.MapException;
import com.onstar.cn.map.common.PoiItemInfo;
import com.onstar.cn.map.common.QueryType;

/**
 * @author Qiying Gong
 *
 * @Created 2013-4-25
 */
public interface OSearchHandlerListener {

	/**
	 * trigger of search results.
	 * @param type types of circle, rectangle and key word
	 * @param results search result
	 * @param pageIndex page index from 1 to n
	 * @param totalPages total pages of results
	 */
	void OnSearchResults(long id,QueryType type,List<PoiItemInfo> results,int pageIndex, int totalPages);
	
	/**
	 * error information of search engine
	 * @param mapExp the exception that will contain: error message, exception and exception type
	 */
	void OnSearchErrors(long id,MapException mapExp);

	/**
	 * The result of reverse code from lat/lon
	 * @param poi the result of PoiItemInfo
	 */
	void OnReverseResults(long id, PoiItemInfo poi);
}
